#ifndef UDPSENDFILEWIDGET_H
#define UDPSENDFILEWIDGET_H

#include <QWidget>
#include <QUdpSocket>
#include <QTimer>
#include <QFileDialog>
#include <QFileInfo>
#include <QFile>
#include <QDebug>
#include <QMessageBox>
#include <QTextStream>

namespace Ui {
class UdpSendFileWidget;
}

class UdpSendFileWidget : public QWidget
{
    Q_OBJECT

public:
    explicit UdpSendFileWidget(QWidget *parent = 0);
    ~UdpSendFileWidget();

private slots:
    void on_pushButtonBrowse_clicked();

    void on_pushButtonSend_clicked();

    void slotTimeout();

    void readBack();

private:
    Ui::UdpSendFileWidget *ui;

    QUdpSocket *udpSocket;
    QTimer *timer;
    QFile *file;
    QString path;
    bool isSended;

};

#endif // UDPSENDFILEWIDGET_H
